import { createRouter, createWebHistory } from 'vue-router';
import PetGrooming from '../views/PetGrooming.vue';
import PetBoarding from '../views/PetBoarding.vue';
import PetTraining from '../views/PetTraining.vue';
import PetMedical from '../views/PetMedical.vue';
import Reservation from '../views/ReservationView.vue';
import HomePage from '../views/HomePage.vue';
import OrderManagement from '../views/OrderManagement.vue';
import OrderDetail from '../views/OrderDetail.vue';

const routes = [
  {
    path: '/', // 默认路由路径
    name: 'HomePage', // 默认路由名称
    component: HomePage // 关联组件
  },
  {
    path: '/pet-grooming',
    name: 'PetGrooming',
    component: PetGrooming
  },
  {
    path: '/pet-medical',
    name: 'PetMedical',
    component: PetMedical
  },
  {
    path: '/pet-training',
    name: 'PetTraining',
    component: PetTraining
  },
  {
    path: '/pet-boarding',
    name: 'PetBoarding',
    component: PetBoarding
  },
  {
    path: '/reservation',
    name: 'Reservation',
    component: Reservation
  },
  {
    path: '/orders',
    name: 'Orders',
    component: OrderManagement
  },
  {
    path: '/orders/:id',
    name: 'OrderDetail',
    component: OrderDetail
  }
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
});

export default router;    